Hello Pravesh Singh! Below I Provide you a demo code for user define exception class.
using System; namespace MindstickCustomeExceptionDemo { public class MindstickEmployeeListNotFoundException : Exception { public MindstickEmployeeListNotFoundException() { } public MindstickEmployeeListNotFoundException(string message) : base(message) { } } class CustomException { static void Main(string[] args) { try { throw new MindstickEmployeeListNotFoundException("\n\n::Mindstick Employee List not found::\n\n"); } catch (MindstickEmployeeListNotFoundException ce) { Console.WriteLine(ce.ToString()); } Console.ReadKey(); } } }
If you want to more knowledge about User define exception class read this link
Liked By
Write Answer
User define exception class
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy
Join MindStick Community
You have need login or register for voting of answers or question.
Vijay Shukla
13-Jun-2013Below I Provide you a demo code for user define exception class.
If you want to more knowledge about User define exception class read this link